package com.zcz.umengpush.service;

import com.zcz.umengpush.mapper.PushMsgHistoryMapper;
import com.zcz.umengpush.mapper.PushMsgMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author 王卫帅
 */
@Service
public class PushMsgHistoryService {
    @Autowired
    private PushMsgHistoryMapper pushMsgHistoryMapper;
    @Autowired
    private PushMsgMapper pushMsgMapper;
    public int move(){
        //移动前一天的消息
        int move = pushMsgHistoryMapper.move();
        if (move != 0){
            //删除上前一天的消息
            pushMsgMapper.del();
        }
        return move;
    }
}
